package org.server.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.server.domain.Login.LoginVerify;
import org.server.domain.Login.MyAttachment;

@Mapper
public interface UserDao {
    @Select("SELECT user_id,user_nick_name,user_account " +
            "FROM poker_user " +
            "WHERE user_account = '${log.account}' AND user_password = '${log.password}'")
    MyAttachment attainUserInfo(@Param("log") LoginVerify loginVerify);

    @Select("SELECT user_id,user_nick_name,user_account " +
            "FROM poker_user " +
            "WHERE user_id = ${id}")
    MyAttachment attainUserInfoByUserId(@Param("id") Long userId);
}
